/* ========== 特性（功能块）布局容器 ========== */
.features {
    /* 容器渐变底色 & 装饰光斑 */
    background: #131722 radial-gradient(circle at top left, rgba(255, 255, 255, 0.02), transparent 70%),
    radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.03), transparent 50%);
    position: relative;
    overflow: hidden;

    display: grid;
    gap: 2.5rem;
    grid-template-columns: repeat(3, 1fr); /* 默认三列 */
    padding: clamp(1.25rem, 5vw, 4rem);
    margin-bottom: 4rem;
    border-radius: 12px;
}

.features::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
    rgba(99, 102, 241, 0.1),
    rgba(99, 102, 241, 0));
}

/* ========== 单个特性项样式 ========== */
.feature {
    position: relative;
    background: rgba(24, 30, 40, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;

    transition: transform 0.4s ease, box-shadow 0.4s ease;
    will-change: transform;
}

.feature:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

/* 彩条装饰 & hover 动效 */
.feature::before {
    content: "";
    position: absolute;
    top: 1rem;
    left: 50%;
    width: 60px;
    height: 6px;
    background: linear-gradient(90deg, #6366f1, #4f54d4);
    border-radius: 3px;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.feature:hover::before {
    width: 80px;
}

/* ========== 特性项标题 ========== */
.feature h2 {
    margin: 2.5rem 0 1.2rem;
    font-size: 1.6rem;
    color: #fff;
    letter-spacing: 1px;
}

/* ========== 特性项文字 ========== */
.feature p {
    color: #b0b9c4;
    font-size: 1.05rem;
    line-height: 1.6;
}

/* ========== 中等屏幕：2+1 居中 ========== */
@media (max-width: 900px) {
    .features {
        grid-template-columns: repeat(2, 1fr);
    }
    .features .feature:nth-child(3) {
        grid-column: 1 / 3;         /* 跨两列 */
        justify-self: center;       /* 居中 */
        width: 100%;                /* 占满两列宽度 */
        max-width: none;            /* 不要再限制宽度 */
    }
}

/* ========== 移动端优化 ========== */
@media (max-width: 480px) {
    .features {
        padding: 1.25rem;
        grid-template-columns: 1fr;
    }
    .features .feature:nth-child(3) {
        grid-column: auto;
        justify-self: stretch;
        max-width: none;
    }
    .feature {
        padding: 2rem 1.5rem;
    }
}
